package com.aruba.attendance.ui.widget.statusbar

import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import com.aruba.attendance.ui.widget.statusbar.SystemUiControllerX

/**
 * Created by aruba on 2023/2/10.
 */
@Composable
fun StatusBarSurface(
    modifier: Modifier = Modifier,
    color: Color = MaterialTheme.colorScheme.background,
    content: @Composable () -> Unit
) {
    Surface(modifier = modifier, color = color) {
        CompositionLocalProvider(
            LocalContentColor provides color
        ) {
            SystemUiControllerX()
        }

        content()
    }
}